

int ledPin = 13;                // LED connected to digital pin 13
int state = 0;
int getL = 7;

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
  pinMode(getL, INPUT);
  Serial.begin(115200);
}

void loop()                     // run over and over again
{
  state = digitalRead(getL);
  if(state == 1){
    state=!state;
    digitalWrite(ledPin, state);
  }
     
}
